package stu.day9_day18;

import java.util.ArrayDeque;

public class LeetCode225 {

    ArrayDeque<Integer> stack = new ArrayDeque<>();

    public void push(int x) {
        stack.addLast(x);
    }

    public int pop() {
        return stack.removeLast();
    }

    public int top() {
        return stack.getLast();
    }

    public boolean empty() {
        return stack.isEmpty();
    }
}
